const KoaRouter = require('@koa/router');
const { verifyLogin, verifyAuth } = require('../middleware/login.middleware');
const { success, test } = require('../controller/login.controller');


// 1. 创建login路由
const loginRouter = new KoaRouter({ prefix: '/login' });
// 2. 中间件 验证登录用户 成功 => 颁发令牌
// 注册
loginRouter.post('/', verifyLogin, success)
// 
loginRouter.get('/test', verifyAuth, test)

module.exports = loginRouter